package cleandroid.ruhax.com.vipvideo;

import java.util.regex.Pattern;

/**
 * Created by zhudongmei on 2016/7/8.
 */
public class StringUtils {
    private final static Pattern URL = Pattern
            .compile("^(https|http)://.*?$(net|com|.com.cn|org|me|)");

    /**
     * 判断是否为一个合法的url地址
     *
     * @param str
     * @return
     */
    public static boolean isUrl(String str) {
        if (str == null || str.trim().length() == 0)
            return false;
        return URL.matcher(str).matches();
    }
}
